# -*- coding:utf-8 -*-

#抛出一个异常
# raise Exception
# raise Exception('exception message')


try:
	print 1/0
except ZeroDivisionError,e:
	print e
except Exception,e:
	print e
finally:
	print 'end'
	
try:
	print 10/2
except (ZeroDivisionError,TypeError,NameError),e:
	print e
from math import floor
	
#全捕捉
try:
	print 1/0
except:
	print 'exception happened'